package com.wantupai.mvp.framework.base.adapter.viewholder.base;


import android.support.annotation.LayoutRes;

import com.wantupai.mvp.framework.base.adapter.viewholder.SmartViewHolder;

/**
 * @author :Created by zhangqing on 2018/5/22 11:54.
 * @description :
 * @email :1423118197@qq.com
 * @classpath : cn.doolii.mvp.framework.base.adapter.viewholder.base.ItemViewDelegate
 */
public interface ItemViewDelegate<T>
{

    /**
     * 获取布局的id
     *
     * @return
     */
    @LayoutRes
    int getItemViewLayoutId();

    /**
     * 该数据类型是否对应此Item
     *
     * @param item
     * @param position
     * @return
     */
    boolean isForViewType(T item, int position);

    /**
     * 给对应数据类型的item绑定数据
     *
     * @param holder
     * @param t
     * @param position
     */
    void convert(SmartViewHolder holder, T t, int position);
}
